<?php

class ProjectAssignment {

    private $mId;
    private $mProject;
    private $mUser;
    private $mIsLoaded;

    public function setId($value){
        $this->mId = $value;
    }
    
    public function getId(){
        return $this->mId;
    }

    public function setProject($value){
        $this->mProject = $value;
    }

    public function getProject(){
         if (($this->mProject != null) && (!$this->mProject->IsLoaded())) {
            $ProjectDao = new ProjectDao();
            $this->mProject = $ProjectDao->getObject($this->mProject->getId());
            if ($this->mProject != null) $this->mProject->setIsLoaded(true);
            }
        return $this->mProject;
    }

    public function setUser($value){
        $this->mUser = $value;
    }

    public function getUser(){
         if (($this->mUser != null) && (!$this->mUser->IsLoaded())) {
            $UserDao = new UserDao();
            $this->mUser = $UserDao->getObject($this->mUser->getId());
            if ($this->mUser != null) $this->mUser->setIsLoaded(true);
            }
        return $this->mUser;
    }
   
    public function setIsEnabled($value){
        $this->mIsEnabled = $value;
    }
    
    public function getIsEnabled(){
        return $this->mIsEnabled;
    }
    
    public function IsLoaded(){
        return $this->mIsLoaded;
    }
    
    public function setIsLoaded($value){
        $this->mIsLoaded = $value;
    }
    
}
